package edu.whu;


public class MyClass {
   /* private int number;*/
    private String name;
    private double price;

    public MyClass() {

    }


    public MyClass(String name, double price) {
        this.name = name;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @InitMethod
    public void init(){
        System.out.println(" the init() method has been executed");
    }
    @InitMethod
    private void init2(String name){
        System.out.println(" The name of mybook has been set. Its name is "+ name);
    }
    public void init3(String price){
        System.out.println(" The price of mybook has been set. It is "+ price);
    }
}
